﻿<navigation:Page x:Class="ProTemplate.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
    xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
    xmlns:uc ="clr-namespace:ProTemplate.UserControls"
    mc:Ignorable="d" Loaded="UserControl_Loaded"
    d:DesignHeight="300" d:DesignWidth="800" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="0" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>        
        <Grid x:Name="TopNavigationGrid" Style="{StaticResource NavigationGridStyle}">
            <StackPanel Orientation="Horizontal" Margin="30,0,0,0">
                <ContentControl Style="{StaticResource LogoIcon}"/>
                <TextBlock Style="{StaticResource ApplicationNameStyle}" Text="Application Name"/>
                <Image x:Name="img1" Width="32" Height="32" />
            </StackPanel>
        </Grid>
        
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="160" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Border Style="{StaticResource NavigationTreeviewBorderStyle}">
                <telerik:RadPanelBar x:Name="radPanelBar" FontFamily="Tahome" VerticalAlignment="Stretch" Margin="5,2,5,0" telerik:Theming.Theme="Office_Blue">
                </telerik:RadPanelBar>
            </Border>
            <Border Grid.Column="1" Style="{StaticResource ContentFrameBorderStyle}">
                <navigation:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}" 
                              Source="/Home" Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed">
                    <navigation:Frame.UriMapper>
                        <uriMapper:UriMapper>
                            <uriMapper:UriMapping Uri="" MappedUri="/Views/Home.xaml"/>
                            <uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}.xaml"/>
                        </uriMapper:UriMapper>
                    </navigation:Frame.UriMapper>
                </navigation:Frame>
            </Border>
        </Grid>
    </Grid>
</navigation:Page>